< previous page page_547 next page >

Page 547
      MsgBox CStr(Err.Number) & " - " + Err.Description
      Resume Next
   End If
   '
LocalExit:
   '
End Sub
Save the form as FRMERRTYPES.FRM and the project as PRJERRTYPES.VBP. Now run this project. When you click on the Control button, the program tries to open the CONTROL.TXT file. If it can't be found, you see the error message (see Figure 14.8).
0547-01.jpg
Figure 14.8.
Displaying the 
File not Found error.
If the user selects OK, the program calls the CommonDialog control and prompts the user to locate the CONTROL.TXT file. It can be found in the \TYSDBVB5\SOURCE\CHAP14 directory (see Figure 14.9).
0547-02.jpg
Figure 14.9.
Attempting to locate the 
CONTROL.TXT file.

 
< previous page page_547 next page >

If you like this book, buy it!